﻿#region Opis pliku
//-----------------------------------------------------------------------------
// HitParticle.cs
// Autor: Jan Fraś
// 30.10.2012
//-----------------------------------------------------------------------------
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace pogra
{
    /// <summary>
    /// odprysk po przyjęciu obrażeń
    /// </summary>
    class HitParticle:Particle
    {
        public HitParticle( Vector2 Position, float Velocity, float rotation, TimeSpan life):
            base(null, Position, Velocity, rotation, life)
        {
        }

        override public void Draw(ExtendedSpriteBatch exSpriteBatch)
        {
            int  size = 2;
            float alpha = (float)(life.TotalMilliseconds / startLife.TotalMilliseconds);
            exSpriteBatch.FillRectangle(new Rectangle((int)(Position.X - size / 2), (int)(Position.Y - size / 2), size, size), Color.Orange * alpha*0.3f);
        }
    }
}
